# Contributor: Carlos Giraldo <cgiraldo@gradiant.org>
# Maintainer: Carlos Giraldo <cgiraldo@gradiant.org>
pkgname=py3-pandas
_pkgname=pandas
pkgver=2.2.3
pkgrel=0
pkgdesc="Powerful data structures for data analysis, time series, and statistics"
url="https://pandas.pydata.org/"
arch="all"
license="BSD-3-Clause"
depends="
	py3-dateutil
	py3-numpy
	py3-tz
	py3-tzdata
	"
makedepends="
	cython
	linux-headers
	py3-gpep517
	py3-meson-python
	py3-numpy-dev
	py3-python-versioneer
	py3-setuptools
	py3-wheel
	python3-dev
	"
subpackages="$pkgname-pyc $pkgname-tests::noarch"
source="https://github.com/pandas-dev/pandas/releases/download/v$pkgver/pandas-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check" # todo

replaces="py-pandas" # Backwards compatibility
provides="py-pandas=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	export CFLAGS="$CFLAGS -flto=auto -O3 -std=gnu99"
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/pandas-$pkgver-*.whl
}

tests() {
	amove usr/lib/python*/site-packages/pandas/tests
}

sha512sums="
9bbff5cf51d7fe5e53b207b3593ba92560dabb15294d6509c5be55e0c2a737fad156ca46e56a7e0bfba7d791edfbcbdf885d6f82e2e1a48b2d5e0fc0ef5e56f5  pandas-2.2.3.tar.gz
"
